<?php
$title= "All category";
$this->headTitle($title);
?>
<div class="panel panel-primary">
    <div class="panel-heading">
    <h4><?php echo $this->escapeHtml($title); ?></h4>
    </div>
    <div class="panel-body">
	<p>
	    <a class="btn btn-info" href="<?php echo $this->url('category', array('action' => 'add'));?>">Add new category</a>
	</p>
	<table class="table">
	    <tr>
		<th>Name</th>
		<th>Alias</th>
		<th>Disabled</th>
		<th>&nbsp;</th>
	    </tr>
	    <?php foreach( $allCategory as $category) :?>
	    <tr>
		<td><?php echo $this->escapeHtml($category->name);?></td>
		<td><?php echo $this->escapeHtml($category->alias);?></td>
		<td>
		    <input type="checkbox" readonly="readonly" disabled="disabled"
		    <?php
			if ($category->disabled ==1) {
			    echo ' checked="checked"';
			}
		    ?>
		    >
		</td>
		<td>
		    <a class="btn btn-success" href="<?php echo $this->url('category',
			    array('action' => 'edit','id' => $category->id,));?>">Edit</a>
		    <a class="btn btn-warning" href="<?php echo $this->url('category',
			    array('action' => 'delete','id' => $category->id,));?>">Delete</a>
		</td>
	    </tr>
	    <?php endforeach;?>
	</table>
    </div>
</div>